package com.atguigu.gmall.product.service;

import com.atguigu.gmall.product.entity.SkuInfo;
import com.atguigu.gmall.product.vo.SkuDataVo;
import com.atguigu.gmall.search.entity.Goods;
import com.baomidou.mybatisplus.extension.service.IService;

import java.math.BigDecimal;

/**
* @author lfy
* @description 针对表【sku_info(库存单元表)】的数据库操作Service
* @createDate 2023-07-11 15:27:09
*/
public interface SkuInfoService extends IService<SkuInfo> {

    /**
     * sku大保存
     * @param skuData
     */
    void saveSkuInfo(SkuDataVo skuData);

    void onSale(Long skuId);

    void cancleSale(Long skuId);

    BigDecimal getRealTimePrice(Long skuId);

    void initSkuidBitMap();

    /**
     * 查询sku的信息，并封装成 Goods 准备给ES上架
     * @param skuId
     * @return
     */
    Goods getSkuInfoForGoods(Long skuId);

    void checkSkuSaveData(SkuDataVo skuData);
}
